package com.hmdp.ThreadUtil;/**
 * @Author:fengxiaohui
 * @Description:
public enum Propagation {
REQUIRED(0),
SUPPORTS(1),
MANDATORY(2),
REQUIRES_NEW(3),
NOT_SUPPORTED(4),
NEVER(5),
NESTED(6);

private final int value;

private Propagation(int value) {
this.value = value;
}

public int value() {
return this.value;
}
}
 线程状态：NEW,

        BLOCKED,

        WAITING,

        TIMED_WAITING,

        TERMINATED;
 */


public enum TestThreadStateDemo {
    NEW(0),
    BLOCKED(1),
    WAITING(2),
    TIME_WAITING(3),
    TERMINATED(4);


    private final int value;

    private TestThreadStateDemo(int value){
        this.value = value;

    }

    public int value(){
        return this.value;
    }

}

class Test01{

    public static void main(String[] args) {
        System.out.println(TestThreadStateDemo.NEW);
        TestThreadStateDemo blocked = TestThreadStateDemo.BLOCKED;

        System.out.println(blocked);
        System.out.println(blocked.value());

    }
}
